import { request } from '@umijs/max';

const BASE_URL = 'http://121.89.205.189:3000';

const http = {
  get(url: string, params?: object) {
    return request(BASE_URL + url, {
      method: 'GET',
      params,
    }).then((res) => {
      return res;
    });
  },
  post(url: string, data?: object) {
    return request(BASE_URL + url, {
      method: 'POST',
      data: data,
    }).then((res) => {
      console.log(res, 2222);

      return res;
    });
  },
};

export default http;
